<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>question</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
		function asubmit() {
			var add = document.getElementById("addForm");		
			add.action="${pageContext.request.contextPath}/question/update.action";
			add.submit();
		}
		function validate(){		
			<c:if test="${not empty msg }">alert("${msg}");</c:if>
		}
	</script>
  </head>
  	
  <body onload="validate()">
    	<form action="#" method="post" id="addForm">
    		<input type="hidden" name="question.id" value="${question.id}" />
    		<input type="text" name="question.title" value="${question.title}" /><br />
    		<input type="text" name="question.content" value="${question.content} "/>
    		<input type="button" value="修改" onclick="asubmit()">
    	</form>
  </body>
</html>
